/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.bodylimit;

import br.com.bodylimit.fronteira.Funcionalidade;
import br.com.bodylimit.fronteira.AlterarAlunoFrame;
import br.com.bodylimit.fronteira.AlunoFrame;
import br.com.bodylimit.fronteira.AlterarFuncionarioFrame;
import br.com.bodylimit.fronteira.FuncionarioFrame;
import br.com.bodylimit.fronteira.MainFrame;
import br.com.bodylimit.model.Aluno;

/**
 *
 * @author Jõao Paulo
 */
public class Main {

    private static AlunoFrame alunoFrame = null;
    private static FuncionarioFrame funcionarioFrame = null;
    private static AlterarFuncionarioFrame alterarFuncionarioFrame = null;
    private static MainFrame mainFrame;

    public static AlunoFrame getAlunoFrame() {
        if (alunoFrame == null) {
            java.awt.EventQueue.invokeLater(new Runnable() {

                public void run() {
                    alunoFrame = new AlunoFrame();
                }
            });
        }
        return alunoFrame;
    }

    public static FuncionarioFrame getFuncionarioFrame() {
        if (funcionarioFrame == null) {
            java.awt.EventQueue.invokeLater(new Runnable() {

                public void run() {
                    funcionarioFrame = new FuncionarioFrame();
                }
            });
        }
        return funcionarioFrame;
    }

    public static MainFrame getMainFrame() {
        if (mainFrame == null) {
            java.awt.EventQueue.invokeLater(new Runnable() {

                public void run() {
                    mainFrame = new MainFrame();
                }
            });
        }
        return mainFrame;
    }    

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                mainFrame = new MainFrame();
                mainFrame.setVisible(true);
            }
        });
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                alunoFrame = new AlunoFrame();

            }
        });


        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                funcionarioFrame = new FuncionarioFrame();
            }
        });
    }
}
